Skip to main content

FileUpload<TReq>

A FileUpload UI component that integrates with the FileUploadFeature.

The File Upload UI component used in the File Blazor Demo has been extracted into a reusable Blazor component you can utilize in your own app, e.g:

Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public class FileUpload<TReq> : BlazorComponentBase, IHasJsonApiClient

Properties

Request

View Source
Declaration
public TReq Request { get; set; }

FilePropertyName

View Source
Declaration
public string FilePropertyName { get; set; }

OnUploadStarted

View Source
Declaration
public EventCallback OnUploadStarted { get; set; }

OnUploadComplete

View Source
Declaration
public EventCallback OnUploadComplete { get; set; }

Inherited Properties

Client

View Source
Declaration
public JsonApiClient Client { get; }

ClientFactory

View Source
Declaration
public IClientFactory ClientFactory { get; set; }

EnableLogging

View Source
Declaration
protected virtual bool EnableLogging { get; }

Gateway

View Source
Declaration
public IServiceGateway Gateway { get; }

UseGateway

View Source
Declaration
public bool UseGateway { get; set; }

Inherited Methods

ApiAppMetadataAsync()

View Source
Declaration
public virtual Task<ApiResult<AppMetadata>> ApiAppMetadataAsync()
Returns

Task<ServiceStack.ApiResult<ServiceStack.AppMetadata>>

ApiAsync(IReturnVoid)

View Source
Declaration
public virtual Task<ApiResult<EmptyResponse>> ApiAsync(IReturnVoid request)
Returns

Task<ServiceStack.ApiResult<EmptyResponse>>

Parameters
TypeName
IReturnVoidrequest

ApiAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public virtual Task<ApiResult<TResponse>> ApiAsync<TResponse>(IReturn<TResponse> request)
Returns

Task<ServiceStack.ApiResult<<TResponse>>>

Parameters
TypeName
IReturn<<TResponse>>request
Type Parameters
  • TResponse

ApiAsync<Model>(Object)

View Source
Declaration
public virtual Task<IHasErrorStatus> ApiAsync<Model>(object request)
Returns

Task<IHasErrorStatus>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • Model

ApiFormAsync<Model>(Object, MultipartFormDataContent)

View Source
Declaration
public virtual Task<ApiResult<Model>> ApiFormAsync<Model>(object requestDto, MultipartFormDataContent request)
Returns

Task<ServiceStack.ApiResult<<Model>>>

Parameters
TypeName
System.ObjectrequestDto
MultipartFormDataContentrequest
Type Parameters
  • Model

log(String, Object[])

View Source
Declaration
protected virtual void log(string message, params object[] args)
Parameters
TypeName
System.Stringmessage
System.Object[]args

SendAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public virtual Task<TResponse> SendAsync<TResponse>(IReturn<TResponse> request)
Returns

Task<<TResponse>>

Parameters
TypeName
IReturn<<TResponse>>request
Type Parameters
  • TResponse

Implements

  • ServiceStack.IHasJsonApiClient